import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:convert';

part 'user_add_new_goods_request.g.dart';
part 'user_add_new_goods_request.freezed.dart';

@freezed
class UserAddNewGoodsRequest with _$UserAddNewGoodsRequest {
  const factory UserAddNewGoodsRequest({
    @JsonKey(name: "cate_id") required List<dynamic> cateId,
    @JsonKey(name: "city") required String city,
    @JsonKey(name: "content") required String content,
    @JsonKey(name: "county") required String county,
    @JsonKey(name: "images") required String images,
    @JsonKey(name: "lat") required String lat,
    @JsonKey(name: "lng") required String lng,
    @JsonKey(name: "province") required String province,
    @JsonKey(name: "tags_ids") required List<dynamic> tagsIds,
    @JsonKey(name: "title") required String title,
    @JsonKey(name: "type") required String type,
  }) = _UserAddNewGoodsRequest;

  factory UserAddNewGoodsRequest.fromJson(Map<String, dynamic> json) =>
      _$UserAddNewGoodsRequestFromJson(json);
}
